<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateWorkOrderFuyouLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('work_order_fuyou_log', function (Blueprint $table) {
            $table->id();
            $table->string('workOrderNo', 32)->default('')->comment('工单号');
            $table->unsignedInteger('status')->default(0)->comment('状态 0提交到富友 1成功 2富友返回失败 3管理员驳回');
            $table->json('content')->nullable()->default('')->comment('提交信息,json');
            $table->json('res')->nullable()->default('')->comment('富友返回,json');
            $table->string('managerRes', 255)->default('')->comment('管理员驳回信息');

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '富友自动进件日志记录表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('work_order_fuyou_log');
    }
}
